package com.google.code.irouter.utils;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;

public final class PropertyUtil {

	private static Configuration CONFIG;

	static {
		try {
			CONFIG = new PropertiesConfiguration("i-router.properties");
		} catch (ConfigurationException e) {
			LogUtil.error(
					LogUtil.TYPE.CORE, 
					PropertyUtil.class, 
					null, 
					LocalUtil.getResource("i-router.batch.common.unknown"), 
					e
			);
		}
	}

	public static String getProperty(String key) {
		return CONFIG.getString(key);
	}

}
